// 统一导出所有API接口
export { default as request, api, tokenManager, BASE_URL } from './request';
export { default as userApi } from './user';
export { default as paperApi } from './paper';
export { default as authApi } from './auth';

// 导出类型定义
export type {
  // 用户相关类型
  UserQueryParams,
  UserInfo,
  UserUpdateRequest,
  UserBatchRequest,
} from './user';

export type {
  // 试卷相关类型
  PaperQueryParams,
  PaperInfo,
  PaperReviewRequest,
  PaperBatchRequest,
  WatermarkRequest,
} from './paper';

export type {
  // 认证相关类型
  LoginRequest,
  LoginResponse,
  AdminUserInfo,
  ChangePasswordRequest,
} from './auth';

// 通用类型
export interface PageResponse<T> {
  content: T[];
  totalElements: number;
  totalPages: number;
  size: number;
  number: number;
  first: boolean;
  last: boolean;
  empty: boolean;
}

export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data?: T;
}

// 常用的请求状态
export enum RequestStatus {
  IDLE = 'idle',
  LOADING = 'loading',
  SUCCESS = 'success',
  ERROR = 'error',
}

// 用户角色枚举
export enum UserRole {
  USER = 0,
  ADMIN = 1,
}

// 用户状态枚举
export enum UserStatus {
  ACTIVE = 0,
  DISABLED = 1,
}

// 试卷状态枚举
export enum PaperStatus {
  PENDING = 'pending',
  APPROVED = 'approved',
  REJECTED = 'rejected',
}

// 水印类型枚举
export enum WatermarkType {
  STANDARD = 'standard',
  STRICT = 'strict',
}